package cn.cjlmonster.demo02.virtual;

import android.util.Log;

import androidx.annotation.NonNull;
import androidx.lifecycle.DefaultLifecycleObserver;
import androidx.lifecycle.LifecycleOwner;

/**
 * cn.cjlmonster.demo02.virtual
 *
 * @author cjl
 * @project Demo02
 * @date 2022/11/6 21:19
 */
public class MyObserver implements DefaultLifecycleObserver {

    private static final String TAG = "生命周期测试";

    @Override
    public void onStart(@NonNull LifecycleOwner owner) {
        Log.i(TAG, "onStart: ");
    }

    @Override
    public void onResume(@NonNull LifecycleOwner owner) {
        Log.i(TAG, "onResume: ");
    }

    @Override
    public void onPause(@NonNull LifecycleOwner owner) {
        Log.i(TAG, "onPause: ");
    }

    @Override
    public void onStop(@NonNull LifecycleOwner owner) {
        Log.i(TAG, "onStop: ");
    }
}
